<?php
/************************FoxPHP威客系统************************/
/*                                                            */
/*  FoxPHP.Com (C)2006-2016 FoxPHP Inc.                       */
/*  This is NOT a freeware, use is subject to license terms   */
/*  FoxPHP威客系统是商业软件,使用于商业用途请购买授权         */
/*  V3.0 2016.3                                               */
/*  foxphp@aliyun.com                                         */
/*  http://www.foxphp.com                                     */
/*                                                            */
/**************************************************************/


namespace Report\Model;
use Think\Model;
use \Org\Util\String;

class ReportModel extends Model {
	
	public function GetReport($type=1){
		$pagenum=intval($_GET['p']);
		
		if($type==1){
			//我发举报
			$wheresql=" uid=$this->uid";
		}else{
			//我被举报
			$wheresql=" ruid=$this->uid";
		}

		$list=$this->token(false)->where($wheresql)->order('dateline DESC')->page($pagenum,10)->select();

		//页码-------------------------------
		$count=$this->token(false)->where($wheresql)->count();
		$Page = new \Think\Page($count,10);
		
		return array('list'=>$list,'page'=>$Page->show());
	}
}

?>